define(["../logic/addanswer","../components/commonCtl"],function(pluginClass,c){
    return {
        pluginClass:pluginClass,
        style:{
            backgroundColor:"#f0f4f6"
        },
        root:["page_content"],
        components:{
          test:{
            type:"button",
            text:"asdasd"
          },
            page_content:{
              type:"view",
              style:{
                flex:1,
                paddingBottom:40,
              },
              root:["answer_textarea","splitLine1","imagewrapper","imagesRepeat"]
            },
            imagesRepeat:{
              type:"repeat",
              ref:true,
              items:[],
              root:["image","imageDelIcon"],
              style:{
                flexDirection:"row",
                flexWrap:"wrap",
                marginTop:5,
                paddingLeft:5
              },
              itemStyle:{
                w:90,
                justifyContent:"center",
                alignItems:"center",
              },
              subComponent:"addImageIcon"
            },
            addImageIcon:{
              type:"icon",
              text:"＋",
              style:{
                w:80,
                backgroundColor:"#fff",
                marginTop:5,
                marginLeft:5,
                border:"1px dashed rgb(207,207,207)",
              },
              textStyle:{
                color:"rgb(207,207,207)",
                fontSize:49
              },
            },
            imageDelIcon:{
              type:"icon",
              font:"icomoon_e909",
              style:{
                position:"absolute",
                right:8,
                border:"2px solid #fff",
                borderRadius:"100%",
                backgroundColor:"#fff",
                top:8
              },
              iconStyle:{
                color:"#FC505F",
                fontSize:17
              }
            },
            image:{
              type:"image",
              src_bind:"src",
              src:"",
              style:{
                w:80,
                backgroundColor:"rgba(0,0,0,.1)"
              }
            },
             imagewrapper:{
              type:"view",
              style:{
                height:50,
                flexDirection:"row",
                justifyContent:"flex-start",
                paddingLeft:15,
                backgroundColor:"#fff"
              },
              root:["photoIcon","CameraIcon"]
            },
            photoIcon:{
              type:"icon",
              font:"icomoon_e907",
              activeClassName:"qaa_picicon_active",
              iconStyle:{
                fontSize:30,
                w:35,
                justifyContent:"center",
                color:"#ccc"
              },style:{
                width:35,
              },
            },
            CameraIcon:{
              type:"icon",
              activeClassName:"qaa_picicon_active",
              font:"icomoon_e905",
              style:{
                marginLeft:12,
                width:35,
              },
              iconStyle:{
                fontSize:30,
                w:35,
                justifyContent:"center",
                color:"#ccc"
              }
            },
             splitLine1:{
              type:"view",
              className:"qaa_splitline",
            },
            answer_textarea:{
              type:"textarea",
              ref:true,
              placeholder:"填写回答",
              style:{
                height:150,
                paddingLeft:15,
                fontSize:15,
                paddingTop:15,
              },
            },

        }
    };
});
